package com.example.android.commitcontent.ime.keyboard.data;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.example.android.commitcontent.ime.beans.PinYinCharacter;

/**
 * 此类放置键盘所需要的数据
 */
public class KeyboardData {


    public static class PinYin {
        //拼音键盘的字母列表
        public static List<PinYinCharacter> BaList = new ArrayList<>();
        public static List<PinYinCharacter> PoList = new ArrayList<>();
        public static List<PinYinCharacter> MeList = new ArrayList<>();
        public static List<PinYinCharacter> FvList = new ArrayList<>();
        public static List<PinYinCharacter> DiList = new ArrayList<>();
        public static List<PinYinCharacter> TuList = new ArrayList<>();
        public static List<PinYinCharacter> NLList = new ArrayList<>();
        public static List<PinYinCharacter> GKList = new ArrayList<>();
        public static List<PinYinCharacter> HJList = new ArrayList<>();
        public static List<PinYinCharacter> QXList = new ArrayList<>();
        public static List<PinYinCharacter> ZzhList = new ArrayList<>();
        public static List<PinYinCharacter> CchList = new ArrayList<>();
        public static List<PinYinCharacter> SshList = new ArrayList<>();
        public static List<PinYinCharacter> RyList = new ArrayList<>();
        public static List<PinYinCharacter> W_List = new ArrayList<>();

        public static List<PinYinCharacter>[] pinYinCharacterList = new List[]{BaList, PoList, MeList, FvList, DiList, TuList, NLList, GKList, HJList, QXList, ZzhList, CchList, SshList, RyList, W_List};

        public static List<String> symbolList = new ArrayList<>();

        static {
            Collections.addAll(BaList,
                    new PinYinCharacter("b", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("a", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ao", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ai", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("an", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ang", PinYinCharacter.Type.YunMu));
            Collections.addAll(PoList,
                    new PinYinCharacter("p", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("o", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ou", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ong", PinYinCharacter.Type.YunMu));
            Collections.addAll(MeList,
                    new PinYinCharacter("m", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("e", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ei", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("er", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("en", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("eng", PinYinCharacter.Type.YunMu));
            Collections.addAll(FvList,
                    new PinYinCharacter("f", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("v", "ü", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("van", "üan", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ve", "üe", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("vn", "ün", PinYinCharacter.Type.YunMu));
            Collections.addAll(DiList,
                    new PinYinCharacter("d", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("i", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ia", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("iao", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ian", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("iang", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("iong", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ie", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("iu", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("in", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ing", PinYinCharacter.Type.YunMu));
            Collections.addAll(TuList,
                    new PinYinCharacter("t", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("u", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ua", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("uai", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("uan", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("uang", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("uo", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ue", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("ui", PinYinCharacter.Type.YunMu),
                    new PinYinCharacter("un", PinYinCharacter.Type.YunMu));

            Collections.addAll(NLList,
                    new PinYinCharacter("n", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("l", PinYinCharacter.Type.ShengMu));
            Collections.addAll(GKList,
                    new PinYinCharacter("g", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("k", PinYinCharacter.Type.ShengMu));
            Collections.addAll(HJList,
                    new PinYinCharacter("h", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("j", PinYinCharacter.Type.ShengMu));
            Collections.addAll(QXList,
                    new PinYinCharacter("q", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("x", PinYinCharacter.Type.ShengMu));
            Collections.addAll(ZzhList,
                    new PinYinCharacter("z", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("zh", PinYinCharacter.Type.ShengMu));
            Collections.addAll(CchList,
                    new PinYinCharacter("c", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("ch", PinYinCharacter.Type.ShengMu));
            Collections.addAll(SshList,
                    new PinYinCharacter("s", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("sh", PinYinCharacter.Type.ShengMu));
            Collections.addAll(RyList,
                    new PinYinCharacter("r", PinYinCharacter.Type.ShengMu),
                    new PinYinCharacter("y", PinYinCharacter.Type.ShengMu));
            Collections.addAll(W_List,
                    new PinYinCharacter("w", PinYinCharacter.Type.ShengMu)/*,
                    new PinYinCharacter(",", "'", PinYinCharacter.Type.SplitSymbol)*/);
            Collections.addAll(symbolList, "，", "。", "？", "、", "！");
        }

    }

    public static class Digit {
        //数字键盘符号列表
        public static List<String> symbolList = new ArrayList<>();

        static {
            Collections.addAll(symbolList, "%", "-", "+", "x", "÷");
        }
    }

    //符号键盘符号列表
    public static final class Symbol {
        public static List<String> enSymbolList = new ArrayList<>();
        public static List<String> cnSymbolList = new ArrayList<>();
        public static List<String> pySymbolList = new ArrayList<>();
        public static List<String> mathSymbolList = new ArrayList<>();
        public static List<List<String>> allSymbolList = new ArrayList<>();

        static {
            Collections.addAll(enSymbolList, ".", "@", "~", "-", ",", ":", "*", "?", "!", "_", "#", "/", "=", "+", "&", "^", ";", "%", "$", "(", ")", "\\", "<", ">", "|", "[", "]", "\"", "{", "}", "'");
            Collections.addAll(cnSymbolList, "，", "。", "？", "！", "、", "：", "—", "～", "·", "￥", "（", "）", "‘", "’", "“", "”", "【", "】", "〖", "〗", "〈", "〉", "《", "》", "「", "」", "『", "』", "〔", "〕");
            Collections.addAll(pySymbolList, "ā", "á", "ǎ", "à", "ō", "ó", "ǒ", "ò", "ê", "ē", "é", "ě", "è", "ī", "í", "ǐ", "ì", "ū", "ú", "ǔ", "ù", "ǖ", "ǘ", "ǚ", "ǜ", "ü");
            Collections.addAll(mathSymbolList, "＋", "－", "±", "×", "÷", "＝", "＜", "＞", "%", "‰", "‱", "^", "≤", "≥", "≒", "≦", "≧", "￥", "$", "√", "≠", "≈", "≡", "≯", "≮", "≌", "∽", "∵", "∴", "∷", "╱", "╲", "∑", "∏", "∝", "∞", "∫", "∮", "∪", "∩", "⊆", "⊂", "⊇", "⊃", "Ω", "∈", "∧", "∨", "∟", "|", "⊥", "∥", "∠", "⌒", "⊙", "⊕", "△", "π", "Φ", "※", "Å", "￡", "¤", "ℓ", "²", "³", "₂", "₃", "½", "¼", "¾", "⅛", "⅜", "⅝", "⅞", "℅", "°", "′", "″", "℃", "℉", "￠", "㎎", "㎏", "㎜", "㎝", "㎞", "㎡", "m", "³", "㏄", "∂");
            Collections.addAll(allSymbolList, cnSymbolList, enSymbolList, pySymbolList, mathSymbolList);
        }
    }
}
